package com.ruoyi.aitcommon.vo;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

class Message {
    private String role;
    private String content;

    // Getters and Setters

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}

public class AIChatVO {
    private String model;
    private List<Message> messages;

    // Getters and Setters

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public List<Message> getMessages() {
        return messages;
    }

    public void setMessages(List<Message> messages) {
        this.messages = messages;
    }

    public void addMessage(String role,String content){
        if(this.messages==null){
            this.messages=new ArrayList<>();
        }
        Message msg=new Message();
        msg.setRole(role);
        msg.setContent(content);
        this.messages.add(msg);
    }
}